package com.dyh.service.link;

import com.dyh.dao.LinkDao;
import com.dyh.pojo.Link;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LinkServiceImpl implements LinkService{

    @Autowired
    private LinkDao linkDao;

    @Override
    public void addLink(Link link) {
        linkDao.addLink(link);
    }

    @Override
    public void deleteLink(int id) {
        linkDao.deleteLink(id);
    }

    @Override
    public void updateLink(Link link) {
        linkDao.updateLink(link);
    }

    @Override
    public List<Link> queryLinkList() {
        return linkDao.queryLinkList();
    }

    @Override
    public Link queryLinkById(int id) {
        return linkDao.queryLinkById(id);
    }
}
